<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>

<head>
	<meta charset="UTF-8"/>
    <title>Search{% if query %} Results{% endif %}</title>
	<link href="{% static "css/bootstrap.css" %}" rel="stylesheet" type="text/css" />
	<link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet" type="text/css" />
</head>

<body>
	<script src="http://code.jquery.com/jquery-latest.js"></script>
	<script src="{% static "js/bootstrap.min.js" }"></script>
	<h1>Search</h1>
	<form action="." method="GET">
		<label for="q">Search: </label>
		<input type="text" name="q" value="{{ query|escape }}">
		<input type="submit" value="Search">
	</form>
 
  {% if query %}
    <h2>Results for "{{ query|escape }}":</h2>
 
    {% if results %}
      <ul>
      {% for book in results %}
        <li>{{ book|escape }}</l1>
      {% endfor %}
      </ul>
    {% else %}
      <p>No books found</p>
    {% endif %}
  {% endif %}
</body>
</html>